import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';

class TestPage extends StatelessWidget {
  const TestPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        title: const Text("新页面"),
      ),
      body: Container(
        color: Colors.lightGreen,
        child: Center(
          child: ElevatedButton(
            child: const Text("返回"),
            onPressed: () {
              GoRouter.of(context).pop();
            },
          ),
        ),
      ),
    );
  }
}
